<?php 
$isAdmin = $this->Session->Read('user.level')=='1'?true:false;
?>
<div class="companies form">
<?php echo $this->Form->create('Company');?>
	<fieldset>
 		<legend><?php __('Add Company'); ?></legend>
	<?php
		echo $this->Form->input('cnpj');
		echo $this->Form->input('social_reason');
		echo $this->Form->input('address');
		echo $this->Form->input('neighborhood');
		echo $this->Form->input('city');
		echo $this->Form->input('cep');
		echo $this->Form->input('rh_contact');
		echo $isAdmin?$this->Form->input('law_11_788'):"";
		echo $isAdmin?$this->Form->input('available'):"";
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('List Companies', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('Logout', true), array('controller'=>'users', 'action' => 'logout')); ?></li>
	</ul>
</div>